package hn.cch.constant;

import hn.cch.aspect.param.AuthParam;
import hn.cch.aspect.param.ParamClass;
import hn.cch.aspect.param.TestParam;

import java.util.ArrayList;
import java.util.HashMap;

public class Common {
    //编码方式
    public static final String CODE = "utf-8";
    //换行方式
    public static final String LINE = "\r\n";

    //请求参数
    public static final String TYPE = "type";
    public static final String USER = "user";
    public static final String HASH = "hash";


    //任务名称
    //核心任务和附带任务是根据玩法分类的执行时间不定的
    public static final String CORE_JOB = "core_job_play_";
    public static final String NEXT_JOB = "next_job_play_";
    //数据任务和文件任务是每天执行一次的定时任务
    public static final String DATA_JOB = "data_job";
    public static final String FILE_JOB = "file_job";

    public static final String TEST_JOB = "test_job";

    //缓存类型
    public static final String SystemCache = "SystemCache";
    public static final String ParamCache = "ParamCache";
    public static final String PlayCache = "PlayCache";
    public static final String UserCache = "UserCache";
    public static final String PipeCache = "PipeCache";
    public static final String TempCache = "TempCache";




















    //数字或字母返回码
    public static final ArrayList<String> digits = new ArrayList<>();
    public static final ArrayList<String> letters = new ArrayList<>();


    public static final HashMap<String, Class<? extends ParamClass>> params = new HashMap<>();


    static {
        //使用path单独判断返回码类型
        digits.add("/http/api/test");

        letters.add("/http/api/auth");

        //结合path和url判断参数类型
        params.put("/http/api/test|test", TestParam.class);
        params.put("/http/api/auth|auth", AuthParam.class);
        params.put("/http/api/test|auth", AuthParam.class);
    }


    public static void main(String[] args) {



    }

}
